<?php
namespace app\web\api;
use app\src\user\enum\RegFromEnum;
use app\src\user\enum\RoleEnum;
use app\web\helper\WebApiHelper;

/**
 * Created by PhpStorm.
 * User: Gooraye
 * Date: 2017-06-03
 * Time: 13:53
 */
class PlatfromApi
{


    public static function childAll($platform_id)
    {
        $data = [
            'api_ver' => '100',
            'platform_id' => $platform_id


        ];
        return WebApiHelper::callRemote('By_Platform_childAll', $data);
    }
    public static function addPlatform($platform_id,$group_id,$city_name,$idcard_number,$bank_card_no,$bank_card_name,$mobile,$idcard_front,$idcard_back,$business_licence,$account_mobile,$account_psw)
    {
        $data = [
            'api_ver' => '100',
            'parent_id' => $platform_id,
            'group_id' => $group_id,
            'city_name' => $city_name,
            'idcard_number' => $idcard_number,
            'bank_card_no' => $bank_card_no,
            'bank_card_name' => $bank_card_name,
            'mobile' => $mobile,
            'idcard_front' => $idcard_front,
            'idcard_back' => $idcard_back,
            'account_mobile' => $account_mobile,
            'account_psw' => $account_psw,
            'business_licence'=>$business_licence


        ];
        return WebApiHelper::callRemote('By_Platform_addPlatform', $data);
    }

    public static function addPlatform2($platform_id,$group_id,$name,$idcard_number,$bank_card_no,$bank_card_name,$mobile,$idcard_front,$idcard_back,$account_mobile,$account_psw)
    {
        $data = [
            'api_ver' => '100',
            'parent_id' => $platform_id,
            'group_id' => $group_id,
            'name' => $name,
            'idcard_number' => $idcard_number,
            'bank_card_no' => $bank_card_no,
            'bank_card_name' => $bank_card_name,
            'mobile' => $mobile,
            'idcard_front' => $idcard_front,
            'idcard_back' => $idcard_back,
            'account_mobile' => $account_mobile,
            'account_psw' => $account_psw


        ];
        return WebApiHelper::callRemote('By_Platform_addPlatform2', $data);
    }


}